//动态api
import request from '@/utils/request'

// 获取所有聊天列表
export const getCustomerServiceMessageList = (data) => request({
  url: '/applet/message/getCustomerServiceMessageList',
  method: 'post',
  data
})

// 获取消息列表
export const getCustomerServiceReplyList = (data) => request({
  url: '/applet/message/getCustomerServiceReplyList',
  method: 'post',
  data
})

// 获取用户id消息列表
export const getCustomerServiceReplyMessageListById = (data) => request({
  url: '/applet/message/getCustomerServiceReplyMessageList',
  method: 'post',
  data
})


// 获取客服信息
export const getUserMessage = (data) => request({
  url: '/biz/getUserMessage',
  method: 'post',
  data
})


// 结束客服聊天
export const endCustomerService = (data) => request({
  url: '/applet/message/endCustomerService',
  method: 'post',
  data
})


// 发送消息
export const sendCustomerServiceMessage = (data) => request({
  url: '/applet/message/sendCustomerServiceMessage',
  method: 'post',
  data
})

// 获取快捷回答信息列表
export const getQuickAnswerByShopId = (data) => request({
  url: '/biz/quickAnswer/getQuickAnswerByShopId',
  method: 'post',
  data
})

// 添加快捷回复\修改
export const addOrUpdateQuickAnswer = (data) => request({
  url: '/biz/quickAnswer/addOrUpdateQuickAnswer',
  method: 'post',
  data
})

// 删除快捷回复
export const deleteQuickAnswerByIds = (data) => request({
  url: '/biz/quickAnswer/deleteQuickAnswerByIds',
  method: 'post',
  data
})


// 根据客服id分页获取用户评价数据
export const getCustomerEvaluateRecordByPage = (data) => request({
  url: '/biz/customerEvaluateRecord/getCustomerEvaluateRecordByPage',
  method: 'post',
  data
})
// 查询客服评价
export const getCustomerEvaluateRecord = (data) => request({
  url: '/biz/customerEvaluateRecord/getCustomerEvaluateRecord',
  method: 'post',
  data
})
// 新增快捷语
export const addQuickPhrases = (data) => request({
  url: '/applet/userQuickPhrases/addQuickPhrases',
  method: 'post',
  data
})

 
// 客服评价设置
export const addCustomerEvaluateRecordMessage = (data) => request({
  url: '/biz/customerEvaluateRecord/addCustomerEvaluateRecordMessage',
  method: 'post',
  data
})
// 获取客服评价设置
// /biz/customerEvaluateRecord/getCustomerEvaluateRecordMessage/{id}
export const getCustomerEvaluateRecordMessage = (id) => request({
  url: `/biz/customerEvaluateRecord/getCustomerEvaluateRecordMessage/${id}`,
  method: 'get'
})


// /applet/message/removeUserFromMessageList
// 移除用户聊天列表 
export const removeUserFromMessageList = (data) => request({
  url: '/applet/message/removeUserFromMessageList',
  method: 'post',
  data
})

// /applet/message/endCustomerServiceByUserId
export const endCustomerServiceByUserId = (data) => request({
  url: '/applet/message/endCustomerServiceByUserId',
  method: 'post',
  data
})